package com.geekchique.runningbuddy.view;

import android.content.Context;
import android.widget.LinearLayout;
import android.widget.TextView;

public class JogEntryView extends LinearLayout {
	
	private TextView miles;
	private TextView heading_jogname;
	private TextView timerun;

	public JogEntryView(Context context, TextView miles, TextView heading_jogname, TextView timerun){
		super(context);
		
        this.setOrientation(VERTICAL);
		this.miles = miles;
		this.heading_jogname = heading_jogname;
		this.timerun = timerun;
		
		
        String headingBeforeAmmend = heading_jogname.getText().toString();
        heading_jogname.setText("Route: " + headingBeforeAmmend);		
        
        addView(heading_jogname, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
        
        String textBeforeAmmend = timerun.getText().toString();
        timerun.setText("Time: " + textBeforeAmmend);

        addView(timerun, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

        String milesBeforeAmmend = miles.getText().toString();
        miles.setText("Distance: " + milesBeforeAmmend);
        
        addView(miles, new LinearLayout.LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));

	}

	public TextView getMiles() {
		return miles;
	}

	public void setMiles(String text) {
		this.miles.setText(text);
	}

	public TextView getHeading_jogname() {
		return heading_jogname;
	}

	public void setHeading_jogname(String text) {
		this.heading_jogname.setText(text);
	}

	public TextView getTimerun() {
		return timerun;
	}

	public void setTimerun(String text) {
		this.timerun.setText(text);
	}

}
